package com.example.helloworld;

/**
 * ClassName: DifferentElementCount
 * Package: com.example.helloworld
 * Description:
 *
 * @Author guotingting
 * @Create 2025/4/21 9:58 AM
 * @Version 1.0
 */
public class DifferentElementCount {
    public static void main(String[] args) {
        int[][] arr = new int[5][];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = new int[i + 1];
            for (int j = 0; j < arr[i].length; j++) {
                arr[i][j] = i + 1;
            }
        }
        
        // 遍历显示
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j] + " ");
            }
            System.out.println();
        }
    }
}
